﻿using System.Web.Mvc;
using UserRoles.Attributes;
using UserRoles.Models;

namespace UserRoles.Controllers
{
    public class RestrictedController : Controller
    {
        [UserRolesAuthorize(UserRoles = new[] { UserRole.Admin})]
        public ActionResult Admin()
        {
            return View();
        }

        [UserRolesAuthorize(UserRoles = new[] { UserRole.Admin, UserRole.Moderator })]
        public ActionResult Moderator()
        {
            return View();
        }

        [UserRolesAuthorize(UserRoles = new[] { UserRole.Admin, UserRole.Moderator, UserRole.User })]
        public ActionResult UserArea()
        {
            return View();
        }
    }
}
